package com.ys.data.client;

import com.common.constant.FeignClientConstant;
import com.common.pojo.Result;
import com.common.vo.RoleVo;
import com.common.vo.UserCodeVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @version: V1.0
 * @author: szw
 * @className: AuthClient
 * @packageName: AuthClient
 * @description: 用户鉴权-client
 * @data: 2021-1-20
 **/
@FeignClient(name = FeignClientConstant.YS_DATA_AUTH_NAME)
public interface AuthClient {

    /**
     * 添加用户中心数据
     *
     * @param userCodeVo
     * @return
     */
    @PostMapping("userCode/insert")
    Result<?> saveUserCode(@Validated @RequestBody UserCodeVo userCodeVo);

    /**
     * 更新用户中心数据
     *
     * @param userCodeVo
     * @return
     */
    @PostMapping("userCode/update")
    Result<?> updateUserCode(@Validated @RequestBody UserCodeVo userCodeVo);


    /**
     * 查询用户中心数据
     *
     * @param userCodeVo
     * @return
     */
    @PostMapping("userCode/find")
    Result<?> findUserCode(@RequestBody UserCodeVo userCodeVo);


    /**
     * 查询角色列表
     *
     * @param roleVo
     * @return
     */
    @PostMapping("role/findRoles")
    Result<?> findRoles(@RequestBody RoleVo roleVo);
}
